package cn.edu.ujn.bmis.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 
 * 用户功能权限表
 * 
 */

@Entity
@Table(name = "userFunction")
public class UserFunction {
	
	private long id;
	private UserInfo userInfo;
	private SysFunction sysFunction;
	
	public UserFunction() {

	}
	
	@Id
	@GeneratedValue
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "functionNum")
	public SysFunction getSysFunction() {
		return sysFunction;
	}
	
	public void setSysFunction(SysFunction sysFunction) {
		this.sysFunction = sysFunction;
	}
	
}
